

package com.hazelcast.internal.config;

import com.hazelcast.config.ListenerConfig;
import com.hazelcast.config.ReliableTopicConfig;
import com.hazelcast.topic.TopicOverloadPolicy;

import javax.annotation.Nullable;
import java.util.concurrent.Executor;

public class ReliableTopicConfigReadOnly extends ReliableTopicConfig {

    public ReliableTopicConfigReadOnly(ReliableTopicConfig config) {
        super(config);
    }

    @Override
    public ReliableTopicConfig setExecutor(Executor executor) {
        throw new UnsupportedOperationException("This config is read-only");
    }

    @Override
    public ReliableTopicConfig setReadBatchSize(int readBatchSize) {
        throw new UnsupportedOperationException("This config is read-only");
    }

    @Override
    public ReliableTopicConfig setStatisticsEnabled(boolean statisticsEnabled) {
        throw new UnsupportedOperationException("This config is read-only");
    }

    @Override
    public ReliableTopicConfig addMessageListenerConfig(ListenerConfig listenerConfig) {
        throw new UnsupportedOperationException("This config is read-only");
    }

    @Override
    public ReliableTopicConfig setTopicOverloadPolicy(TopicOverloadPolicy topicOverloadPolicy) {
        throw new UnsupportedOperationException("This config is read-only");
    }

    @Override
    public ReliableTopicConfig setUserCodeNamespace(@Nullable String userCodeNamespace) {
        throw new UnsupportedOperationException("This config is read-only");
    }
}
